Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

telegram-desktop: make webkitgtk dependency optional #353243

Closed

Conversation

ilya-fedin
Copy link
Contributor

@ilya-fedin ilya-fedin commented Nov 2, 2024

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@ilya-fedin ilya-fedin force-pushed the tdesktop-webkitgtk-optional branch 3 times, most recently from 01fa302 to 3c010d4 Compare November 2, 2024 23:39
@ilya-fedin
Copy link
Contributor Author

Result of nixpkgs-review pr 353243 run on x86_64-linux 1

1 package failed to build:
  • materialgram
3 packages built:
  • _64gram
  • kotatogram-desktop
  • telegram-desktop

@ilya-fedin ilya-fedin force-pushed the tdesktop-webkitgtk-optional branch from 3c010d4 to e9327e9 Compare November 3, 2024 10:23
@ilya-fedin ilya-fedin requested a review from NickCao November 3, 2024 10:34
@ilya-fedin ilya-fedin force-pushed the tdesktop-webkitgtk-optional branch from e9327e9 to c8e55aa Compare November 3, 2024 16:32
@ilya-fedin ilya-fedin force-pushed the tdesktop-webkitgtk-optional branch from c8e55aa to 23021c4 Compare November 3, 2024 17:03
'';
postFixup = ''
mkdir -p $out/bin
makeBinaryWrapper {${telegram-desktop},$out}/bin/${telegram-desktop.meta.mainProgram} \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It occurred to me: this is double wrapping right? Maybe we should follow the route of having a telegram-desktop-unwrapped.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it is... I'm not sure whether it would be trivial to get Qt wrapper args in a separate derivation?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Me neither, we can ignore the aesthetic issue with double wrapping for now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Surprsingly, I actually managed to get it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would this be ok?

Another idea is to copy the unwrapped binary instead of depending on the non-webkit telegram-desktop package.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My idea is to rename the original tdesktop package to tdesktop-unwrapped (minus the wrapper part), then create a new tdesktop package for the wrapper, with the argument withWebkitgtk.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm... That would mean each override has to provide two packages (unwrapped and wrapped)? And those sitting in by-name will get -unwrapped in their folder names?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not necessarily, as in NickCao@303fc78

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, ok. Will you submit it? kotato looks broken though as it switches it from Qt 5 to Qt 6 which won't work...

P.S. reading the diff I noticed I forgot to remove kAudioObjectPropertyElementMain -> kAudioObjectPropertyElementMaster replacement which shouldn't be needed with the new sdk...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed, see #353524

@ilya-fedin ilya-fedin force-pushed the tdesktop-webkitgtk-optional branch from 23021c4 to cae6e4f Compare November 3, 2024 17:34
@ilya-fedin ilya-fedin force-pushed the tdesktop-webkitgtk-optional branch from cae6e4f to 92a8c64 Compare November 3, 2024 17:36
@ofborg ofborg bot added the 2.status: merge conflict This PR has merge conflicts with the target branch label Nov 3, 2024
@ilya-fedin ilya-fedin closed this Nov 3, 2024
@ilya-fedin ilya-fedin deleted the tdesktop-webkitgtk-optional branch November 3, 2024 22:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.status: merge conflict This PR has merge conflicts with the target branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants